package org.niit.app

import org.apache.spark.streaming.dstream.DStream
import org.niit.bean.AdClickData
import org.niit.common.TApp
import org.niit.controller.ZhangTimeController
import org.niit.handler.DataHandler

object ZhangTimeApp extends App with TApp{

  start(appName = "ZhangTimeApp"){  // 继承TApp

    val zhangTimeController = new ZhangTimeController

    val value: DStream[AdClickData] = DataHandler.KafkaDataHandler("BD1", "newBD1")  // 获取Kafka的数据，实时的数据分析

    zhangTimeController.dispatch(value)

    DataHandler.startAndAwait()

  }

}
